import 'package:json_annotation/json_annotation.dart';

part 'data.g.dart';

@JsonSerializable()
class CjwtList {
  int code;
  List<CjwtListDatum> data;
  String msg;

  CjwtList({
    this.code,
    this.data,
    this.msg,
  });

  //反序列化
  factory CjwtList.fromJson(Map<String, dynamic> json) =>
      _$CjwtListFromJson(json);

  //序列化
  Map<String, dynamic> toJson() => _$CjwtListToJson(this);
}

@JsonSerializable()
class CjwtListDatum {
  String name;
  String wenti;
  String huifu;

  CjwtListDatum({
    this.name,
    this.wenti,
    this.huifu,
  });

  //反序列化
  factory CjwtListDatum.fromJson(Map<String, dynamic> json) =>
      _$CjwtListDatumFromJson(json);

  //序列化
  Map<String, dynamic> toJson() => _$CjwtListDatumToJson(this);
}
